<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">项目状态</td><td class="tv" id="state_name" colspan="3"></td></tr>
                <tr><td class="tt">项目名称</td><td class="tv" id="name"></td><td class="tt">项目类别</td><td class="tv" id="entype_name"></td></tr>
                <tr><td class="tt">委托方</td><td class="tv" id="weier"></td><td class="tt">项目编号</td><td class="tv" id="number"></td></tr>
                <tr><td class="tt">招标代理公司</td><td class="tv" id="zhaounit"></td><td class="tt">招标方式</td><td class="tv" id="zhaotype_name"></td></tr>
                <tr><td class="tt">投标文件递交方式</td><td class="tv" id="touditype_name"></td><td class="tt">开标时间</td><td class="tv" id="kaidt"></td></tr>

                <tr class="entype2 layui-hide"><td class="tt">资质类型</td><td class="tv" id="bidtype_name"></td><td class="tt">投标负责人</td><td class="tv" id="touer_name"></td></tr>
                <tr class="entype2 layui-hide"><td class="tt">投标保证金金额(元)</td><td class="tv" id="toufee"></td><td class="tt">投标保证金说明</td><td class="tv" id="toushuo"></td></tr>

                <tr class="entype1 layui-hide"><td class="tt">管理费费率(%)</td><td class="tv" id="guanrate" colspan="3"></td></tr>

                <tr class="entype0 entype3 layui-hide"><td class="tt">管理费费率(%)</td><td class="tv" id="guanrate" colspan="3"></td></tr>
                <tr class="entype3 layui-hide"><td class="tt">成本票提交比例(%)</td><td class="tv" id="piaorate"></td><td class="tt">居间费比例(%)</td><td class="tv" id="jianrate"></td></tr>
                <tr class="entype3 layui-hide"><td class="tt">招标方</td><td class="tv" id="zhaoname"></td><td class="tt">所在地</td><td class="tv" id="areas"></td></tr>
                <tr><td class="tt">项目说明</td><td class="tv" id="bidshuo" colspan="3"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div class="table-box tablenes entype-hide">
            <div class="title">中标信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">开标结果</td><td class="tv" id="state_name2" colspan="3"></td></tr>
                <tr class="state3 layui-hide"><td class="tt">中标日期</td><td class="tv" id="kai_windt"></td><td class="tt">中标价(元)</td><td class="tv" id="kai_fee"></td></tr>
                <tr><td class="tt">开标结果说明</td><td class="tv" id="kai_explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo_list">投标单位明细</script>
            <div class="tableShow">
                <table id="datalist_list" lay-filter="datalist_list"></table>
            </div>
        </div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_bid_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;

                if(data.entype == 1){
                    $(".entype1").removeClass('layui-hide');
                    $(".entype2").removeClass('layui-hide');
                    $(".entype3").removeClass('layui-hide');
                    $("#entype_name").text('中标项目');
                    $(".entype0").addClass('layui-hide');
                }else if(data.entype == 2){
                    $(".entype2").removeClass('layui-hide');
                    $("#entype_name").text('陪标项目');
                }else{
                    $(".entype333").removeClass('layui-hide');
                    $("#entype_name").text('代写项目');
                }

                $("#state_name").html(data.state_name);
                $("#name").text(data.name);
                $("#number").text(data.number);
                $("#weier").text(data.weier);
                $("#chanid_name").text(data.chanid_name);
                $("#zhaoname").text(data.zhaoname);
                $("#bidtype_name").text(data.bidtype_name);
                $("#areas").text(data.areas);
                $("#addr").text(data.addr);
                $("#zhaounit").text(data.zhaounit);
                $("#gongfee").text(data.gongfee);
                $("#zhaotype_name").text(data.zhaotype_name);
                $("#touditype_name").text(data.touditype_name);
                $("#enddt_bao").text(data.enddt_bao);
                $("#enddt_tou").text(data.enddt_tou);
                $("#kaidt").text(data.kaidt);
                $("#kaiaddr").text(data.kaiaddr);
                $("#toufee").text(data.toufee);
                $("#toushuo").text(data.toushuo);
                $("#touer_name").text(data.touer_name);
                $("#bidshuo").text(data.bidshuo);
                $("#guanrate").text(data.guanrate);
                $("#jianrate").text(data.jianrate);
                $("#piaorate").text(data.piaorate);
                $("#explain").text(data.explain);


                if(data.state == 3){
                    $(".state3").removeClass('layui-hide');
                }
                $("#state_name2").html(data.state_name);
                $("#kai_windt").text(data.kai_windt);
                $("#kai_fee").text(data.kai_fee);
                $("#kai_explain").text(data.kai_explain);

                if(data.entype == 3){
                    if(data.state != 3 && data.state != 6){
                        $("#state_name").html('');
                        $("#state_name2").html('');
                    }
                }



                if(data.entype == 3){
                    var mytableList = table.render({
                        elem: "#datalist_list",data:res.data.list, toolbar: '#toolbarDemo_gong', page: false
                        ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                        ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                        ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                        , cols: [[
                            {type:'numbers',title:'序号',fixed:'left'}
                            ,{field: 'touunit', title: '投标单位'}
                            ,{field: 'touxing_name', title: '性质'}
                            ,{field: 'kaiguo', title: '开标结果'}
                            ,{field: 'kaishuo', title: '开标说明'}
                            ,{field: 'explain', title: '备注'}
                        ]]
                        , done: function (res) {
                            soulTable.render(this);
                        }
                    });
                }else{
                    var mytableList = table.render({
                        elem: "#datalist_list",data:res.data.list, toolbar: '#toolbarDemo_gong', page: false
                        ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                        ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                        ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                        , cols: [[
                            {type:'numbers',title:'序号',fixed:'left'}
                            ,{field: 'touunit', title: '投标单位'}
                            ,{field: 'touxing_name', title: '性质'}
                            ,{field: 'baofee', title: '报名费(元)'}
                            ,{field: 'zhifee', title: '资质使用费(元)'}
                            ,{field: 'shenfee', title: '资审费(元)'}
                            ,{field: 'biaofee', title: '标书费用(元)'}
                            ,{field: 'kaiguo', title: '开标结果'}
                            ,{field: 'kaishuo', title: '开标说明'}
                            ,{field: 'explain', title: '备注'}
                        ]]
                        , done: function (res) {
                            soulTable.render(this);
                        }
                    });
                }



                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('bid', param_id);
    });



</script>
</body>
</html>




